use ClientPlatform

var isin = db.CriteriaLevel3.findOne({Name: "ISIN"});
var sedol = db.CriteriaLevel3.findOne({Name: "Sedol"});
var cusip = db.CriteriaLevel3.findOne({Name: "CUSIP"});

var businessOverview = db.CriteriaLevel2.findOne({Name: "Business overview"});

isin.CriteriaLevel2Id = businessOverview._id;
sedol.CriteriaLevel2Id = businessOverview._id;
cusip.CriteriaLevel2Id = businessOverview._id;

db.CriteriaLevel3.save(isin);
db.CriteriaLevel3.save(sedol);
db.CriteriaLevel3.save(cusip);

var isin = db.TemplateCriteria.findOne({Name: "ISIN"});
var sedol = db.TemplateCriteria.findOne({Name: "Sedol"});
var cusip = db.TemplateCriteria.findOne({Name: "CUSIP"});

var businessOverview = db.CriteriaLevel2.findOne({Name: "Business overview"});

isin.CriteriaLevel2Id = businessOverview._id;
sedol.CriteriaLevel2Id = businessOverview._id;
cusip.CriteriaLevel2Id = businessOverview._id;

db.TemplateCriteria.save(isin);
db.TemplateCriteria.save(sedol);
db.TemplateCriteria.save(cusip);
